﻿<Window x:Class="WpfPaintPolygon.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Ear clipping" Height="600" Width="800" MinHeight="600" MinWidth="800">
    <Grid Background="#FFF1EDED">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition />
            <RowDefinition Height="25" />
        </Grid.RowDefinitions>
        
        <WrapPanel>
            <Button x:Name="ClearButton" Content="Clear" Width="100" Click="ClearButton_Click" />
            <Button x:Name="EarButton" Content="Ear" Width="100" Click="EarButton_Click" />
        </WrapPanel>

        <Border x:Name="PolyBorder" Grid.Row="1" BorderThickness="1" BorderBrush="Black" Margin="5" Width="600" Height="450">
            <Border.LayoutTransform>
                <ScaleTransform CenterX="0" CenterY="0" ScaleX="1" ScaleY="1" />
            </Border.LayoutTransform>
            
            <Canvas x:Name="PolyCanvas" Background="White"
                MouseDown="PolyCanvas_MouseDown" MouseUp="PolyCanvas_MouseUp" MouseMove="PolyCanvas_MouseMove" >
            </Canvas>
        </Border>

        <StatusBar x:Name="StatusB" Grid.Row="2" >
            <TextBlock x:Name="PointsBlock" />
        </StatusBar>
    </Grid>
</Window>
